package com.example.hxds.bff.customer.controller.form;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

/**
 * @Author XUYANG
 * @Date 2024-03-16 15:20
 */
@Data
@Schema(description = "注册新用户")
public class RegisterNewCustomerForm {
    @NotBlank(message = "授权不能为空")
    @Schema(description = "微信小程序临时授权")
    private String code;
    @NotBlank(message = "昵称不能为空")
    @Schema(description = "用户昵称")
    private String nickname;
    @NotBlank(message = "头像不能为空")
    @Schema(description = "用户头像")
    private String photo;
    @NotBlank(message = "性别不能为空")
    @Pattern(regexp = "^男$|^女$|^无$",message = "性别内容错误")
    private String sex;
    @NotBlank(message = "电话不能为空")
    @Pattern(regexp = "^1\\d{10}$",message = "tel内容不正确")
    @Schema(description = "电话号码")
    private String tel;
}
